The workplacemanagement API allows you to do the following with Asset records:
GET
Get All Assets | Authenticated
Get All Assets | URL
Get One Asset | Authenticated
Get One Asset | URL
Result (two records)
POST (create)
POST | Authenticated
Result
PUT (update)
PUT | Authenticated
Result
DELETE
Delete | Authenticated
Result
GET
Get All Assets | Authenticated
Syntax:
GET {Domain}/workplacemanagement4/{ProjectName}/api/Asset
e.g.
GET http://localhost/workplacemanagement4/ProjectName/api/Asset
GET https://domain.com/workplacemanagement4/MainOffice/api/Asset
Get All Assets | URL
Syntax:
{Domain}/workplacemanagement4/{ProjectName}/api/Asset?apikey={APIKey}
e.g.
http://localhost/workplacemanagement4/ProjectName/api/Asset?apikey=aP2bjYAeeYrUx0hPYQ
https://domain.com/workplacemanagement4/MainOffice/api/Asset?apikey=l4MZnM2Y58lwVgubQn
Get One Asset | Authenticated
Syntax:
GET {Domain}/workplacemanagement4/{ProjectName}/api/Asset/{id}
e.g.
GET http://localhost/workplacemanagement4/ProjectName/api/Asset/20191104110235817
GET https://domain.com/workplacemanagement4/MainOffice/api/Asset/20180921194845701
Get One Asset | URL
Syntax:
{Domain}/workplacemanagement4/{ProjectName}/api/Asset/{id}?apikey={APIKey}
e.g.
http://localhost/workplacemanagement4/ProjectName/api/Asset/6lnnh96x6hj0?apikey=aP2bjYAeeYrUx0hPYQ
Result (two records)
[
{
"asset_id": "20180921201109366",
"floor_id": "4",
"name": "Printer 12",
"category": "Printer",
"top": "1392",
"left": "613",
"width": "-1",
"height": "-1",
"make": "Canon",
"model": "",
"serial number": "77756565",
"date purchased": "2018-12-06",
"phone number": "",
"conferencing": "False",
"voicemail": "False",
"copier": "False",
"employee_id": "",
"picalign": "",
"customclickurl": "",
"key": "",
"latitude": "",
"longitude": ""
},
{
"asset_id": "2018092217102034",
"floor_id": "4",
"name": "Projector 01",
"category": "Projector",
"top": "96",
"left": "2489",
"width": "-1",
"height": "-1",
"make": "Benq",
"model": "",
"serial number": "67867444",
"date purchased": "2018-09-24 10:16:13 AM",
"phone number": "",
"conferencing": "False",
"voicemail": "False",
"copier": "False",
"employee_id": "",
"picalign": "",
"customclickurl": "",
"key": "",
"latitude": "",
"longitude": ""
}
]
POST (create)
When creating a new record, the unique asset ID will be automatically created and does not need to be included as parameter.
POST | Authenticated
Syntax:
POST {Domain}/workplacemanagement4/{ProjectName}/api/Asset/?{parameter1:value1}&{parameter2}:{value2}...
e.g.
POST http://localhost/workplacemanagement4/ProjectName/api/Asset/?name=Printer17&Manufacturer=Canon
POST https://domain.com/workplacemanagement4/ProjectName/api/Asset/?name=Microwave&category=Kitchen&size=medium
Result
[
{
"id": "2020020726122423"
},
{
"status": "Asset record successfully added"
}
]
PUT (update)
PUT | Authenticated
Syntax:
PUT {Domain}/workplacemanagement4/{ProjectName}/api/Asset/{id}?{parameter1:value1}&{parameter2:value2}...
e.g.
PUT http://localhost/workplacemanagement4/ProjectName/api/Asset/2020020679547848?status=broken&dateupdated=2020-02-07
PUT https://domain.com/workplacemanagement4/MainOffice/api/Asset/2020020619325472?employee_id=2018928791&name=Personal Printer
Result
[
{
"status": "Asset record successfully updated"
}
]
DELETE
Delete | Authenticated
Syntax:
DELETE {Domain}/workplacemanagement4/{ProjectName}/api/Asset/{id}
e.g.
DELETE http://localhost/workplacemanagement4/ProjectName/api/Asset/201711300130174407
DELETE https://domain.com/workplacemanagement4/MainOffice/api/Asset/2020020630313932
Result
[
{
"status": "Asset record successfully deleted"
}
]
https://mobirise.com website builder